import Vue from "vue";
import Router from "vue-router";
import LoginRegist from "@/components/LoginRegist";
import Home from "../components/Home";
import HomeDetail from "../components/HomeDetail";
import Visit from "../components/Visit";

import VisitToday from "../components/VisitToday";
import VisitInformation from "../components/VisitInformation";
import Menu from "../components/Menu";
import MyInformation from "../components/MyInformation";
import VisitHandling from "../components/VisitHandling";
import VisitArchiving from "../components/VisitArchiving";
Vue.use(Router);

export default new Router({
    routes: [{
            path: '',
            redirect: "/home"
        },
        {
            path: "/home",
            component: Home,
            // redirect: '/home',
            children: [{
                    path: "",
                    component: HomeDetail
                },
                {
                    path: "/visit",
                    component: Visit
                }
            ]
        },
        {
            path: "/login",
            component: LoginRegist
        },
        // {
        //     path: '/home',
        //     component: Home
        // },
        // {
        //     path: '/visit',
        //     component: Visit
        // },

        {
            path: "/visittoday",
            component: VisitToday
        },
        {
            path: "/visitinformation",
            component: VisitInformation
        },
        {
            path: "/menu",
            component: Menu
        },
        {
            path: "/myinformation",
            component: MyInformation
        },
        {
            path: "/visithandling",
            component: VisitHandling
        },
        {
            path: "/visitarchiving",
            component: VisitArchiving
        }
    ]
});